import request from '@/utils/request'

// 某个用户在某个活动下的所有中奖记录
// export function getAwardListByUserId(userId, activityId) {
//   return request({
//     url: '/lottery/activity/awardListByUserId/' + userId + '/' + activityId,
//     method: 'get'
//   })
// }

// 查询抽奖活动列表
export function listActivity(query) {
  return request({
    url: '/lottery/activity/list',
    method: 'get',
    params: query
  })
}

// 查询抽奖活动详细
export function getActivity(id) {
  return request({
    url: '/lottery/activity/' + id,
    method: 'get'
  })
}

// 新增抽奖活动
export function addActivity(data) {
  return request({
    url: '/lottery/activity',
    method: 'post',
    data: data
  })
}

// 修改抽奖活动
export function updateActivity(data) {
  return request({
    url: '/lottery/activity',
    method: 'put',
    data: data
  })
}

// 删除抽奖活动
export function delActivity(id) {
  return request({
    url: '/lottery/activity/' + id,
    method: 'delete'
  })
}
